package com.nimitz.modules.approval.mapper;


import com.nimitz.modules.approval.domain.ApprovalProcedure;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @ClassName ApprovalProcedureMapper
 * @Author FuCun
 * @Date 2021-08-17-14:45
 * @PackageName com.nimitz.modules.approval.mapper
 * @Description 审批流-接口
 * @Version 1.0.0
 */
@Repository
public interface ApprovalProcedureMapper  {

    /**
     * 查询所有审批流（含搜索）
     *
     * @param  approvalProcedure 审批流
     * @return 审批流集合
     */
    List<ApprovalProcedure> selectApprovalProcedureList(ApprovalProcedure approvalProcedure);

    /**
     * 新增审批流信息
     *
     * @param approvalProcedure 审批流
     * @return 结果
     */
    int insertApprovalProcedure(ApprovalProcedure approvalProcedure);

    /**
     * 修改审批流信息
     *
     * @param approvalProcedure 审批流
     * @return 结果
     */
    int updateApprovalProcedure(ApprovalProcedure approvalProcedure);

    /**
     * 删除审批流信息
     *
     * @param procedureId 流id
     * @return 结果
     */
    int deleteApprovalProcedureByProcedureId(Long procedureId);

    /**
     * 校验审批流名称是否唯一
     *
     * @param procedureName 审批流名称
     * @return 结果
     */
    ApprovalProcedure checkApprovalProcedureNameUnique(@Param("procedureName")String procedureName);


}
